import { RouteRecordRaw } from 'vue-router'

export const adminRoutes: RouteRecordRaw[] = [
  {
    path: '/admin',
    component: () => import('@/layouts/index.vue'),
    redirect: '/admin/index',
    meta: {
      requiresAuth: true,
    },
    children: [
      {
        path: 'index',
        name: 'AdminIndex',
        component: () => import('@/pages/admin/index/index.vue'),
      },
      {
        path: 'user',
        name: 'User',
        component: () => import('@/pages/admin/user/index.vue'),
      },
      {
        path: 'user_info',
        name: 'AdminInfo',
        component: () => import('@/pages/admin/user_info/index.vue'),
      },
      {
        path: 'role',
        name: 'Role',
        component: () => import('@/pages/admin/role/index.vue'),
      },
      {
        path: 'permission',
        name: 'Permission',
        component: () => import('@/pages/admin/permission/index.vue'),
      },
      {
        path: 'login_log',
        name: 'LoginLog',
        component: () => import('@/pages/admin/login_log/index.vue'),
      },
      {
        path: 'operation_log',
        name: 'OperationLog',
        component: () => import('@/pages/admin/operation_log/index.vue'),
      },
      {
        path: 'user_profile',
        name: 'AdminProfile',
        component: () => import('@/pages/userProfile/index.vue'),
      },
    ]
  }
]